<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org" xmlns:about="http://www.w3.org/1999/xhtml">
<head>
    <title>新增新闻</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script type="text/javascript" src="js/jquery/jquery-1.7.1.js"></script>
    <!--<link href="css/basic_layout.css" rel="stylesheet" type="text/css">-->
    <!--<link href="css/common_style.css" rel="stylesheet" type="text/css">-->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script type="text/javascript" src="js/authority/commonAll.js"></script>
    <script type="text/javascript" src="js/jquery/jquery-1.4.4.min.js"></script>
    <script src="js/My97DatePicker/WdatePicker.js" type="text/javascript" defer="defer"></script>
    <script type="text/javascript" src="js/artDialog/artDialog.js?skin=default"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            /*
             * 提交
             */
            $("#submitbutton").click(function() {
                if(validateForm()){
                    checkFyFhSubmit();
                }
            });

            /*
             * 取消
             */
            $("#cancelbutton").click(function() {
                /**  关闭弹出iframe  **/
                window.parent.$.fancybox.close();
            });

            var result = 'null';
            if(result =='success'){
                /**  关闭弹出iframe  **/
                window.parent.$.fancybox.close();
            }
        });


        /** 表单验证  **/
        function validateForm(){
            if($("#fyXqName").val()==""){
                art.dialog({icon:'error', title:'友情提示', drag:false, resize:false, content:'填写房源小区', ok:true,});
                return false;
            }
            if($("#fyDh").val()==""){
                art.dialog({icon:'error', title:'友情提示', drag:false, resize:false, content:'填写房源栋号', ok:true,});
                return false;
            }
            if($("#fyCh").val()==""){
                art.dialog({icon:'error', title:'友情提示', drag:false, resize:false, content:'填写房源层号', ok:true,});
                return false;
            }
            if($("#fyFh").val()==""){
                art.dialog({icon:'error', title:'友情提示', drag:false, resize:false, content:'填写房源房号', ok:true,});
                return false;
            }
            if($("#fyZongMj").val()==""){
                art.dialog({icon:'error', title:'友情提示', drag:false, resize:false, content:'填写房源面积', ok:true,});
                return false;
            }
            if($("#fyJizuMj").val()==""){
                art.dialog({icon:'error', title:'友情提示', drag:false, resize:false, content:'填写计租面积', ok:true,});
                return false;
            }
            if($("#fyZldz").val()==""){
                art.dialog({icon:'error', title:'友情提示', drag:false, resize:false, content:'填写房源座落地址', ok:true,});
                return false;
            }
            return true;
        }

        function closeWin() {
            window.opener=null;
            window.open('','_self');
            window.close();
        }

    </script>
</head>

<body>
<div id="nav_links">
    <div id="page_close">
        <a href="javascript:parent.$.fancybox.close();">
            <img src="images/common/page_close.png" width="35" height="35" align="right"/>
        </a>
    </div>
</div>
<center>
    <br><br>
    <h2 style="color:green">新增经纪人</h2>
    <br><br>
    <form class="form-horizontal" role="form" action="#"  th:action="@{/insertnews}"  method="post">

        <div class="form-group" style="width:300px">
            <label for="title" class="col-sm-2 control-label">标题</label>
            <div class="col-sm-10">
                <input type="title"  name="agentName" class="form-control" id="title" placeholder="Enter name">
            </div>
        </div>

        <div class="form-group" style="width:300px">
            <label for="content" class="col-sm-2 control-label">内容</label>
            <div class="col-sm-10">
                <input type="text" name="content" class="form-control" id="content" placeholder="Enter telephone">
            </div>
        </div>

        <div class="form-group" style="width:300px">
            <label for="type" class="col-sm-2 control-label">类型</label>
            <div class="col-sm-10">
                <select  name="type" class="form-control" id="type">
                    <option value="">--请选择--</option>
                    <option value="都市">都市</option>
                    <option value="房价">房价</option>
                </select> </br>
            </div>
        </div>
        <div class="form-group">
            <div>
                <input type="submit" class="btn btn-primary" id="btn" value="Submit"/>
                <input  type="reset" class="btn btn-warning" value="Reset" />
                <input type="button" id="cancelbutton"  class="btn btn-info" value="Close" />
            </div>
        </div>
    </form>

</center>

</body>
</html>